import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        city: '武汉'
    },
    mutations: {
        handleCity(state, e) {
            state.city = e
            localStorage.setItem("city", state.city);
        }
    },
    actions: {
        handleCity(ctx, e) {
            ctx.commit('handleCity', e)
        }
    },
    modules: {
    }
})
